<ion-view view-title="密码修改">
  <ion-content>
    <form novalidate name="myform">
            <input type="hidden" style="" readonly  id="name" placeholder="{{user.name}}" ng-model="pwd.name" />
            <label class="item item-input item-stacked-label" >
                <span class="input-label">原密码：</span>
                <input type="password" autocomplete="off" ng-blur="lostFocus(0)" id="oldpwd" name="oldpwd"  placeholder="请输入原密码" ng-model="pwd.oldpwd" required/>
                <span  class="assertive" ng-show="myform.oldpwd.$invalid" ng-hide="pwd.oldpwdfocus">
                    <span ng-show="myform.oldpwd.$error.required">*请输入原密码</span>
                </span>
            </label>
            <label class="item item-input item-stacked-label" >
                <span class="input-label">新密码：</span>
                <input type="password"   id="newpwd" name="newpwd" ng-blur="lostFocus(1)" ng-change="pwdSame()" ng-minlength=6 ng-maxlength=6  placeholder="请输入6位数新密码" ng-model="pwd.newpwd" required/>
                <span  class="assertive" ng-show="myform.newpwd.$invalid" ng-hide="pwd.pwdfocus">
                        <span ng-show="myform.newpwd.$error.required">*请输入新密码</span>
                        <span ng-show="myform.newpwd.$error.minlength">*密码长度为6位</span>
                        <span ng-show="myform.newpwd.$error.maxlength">*密码长度为6位</span>
                </span>
            </label>
            <label class="item item-input item-stacked-label " >
              <span class="input-label ">再次输入新密码：</span>
              <input type="password" name="renewpwd" id="renewpwd" ng-blur="lostFocus(2)"  ng-change="pwdSame()"   placeholder="请再次输入新密码" ng-model="pwd.renewpwd" required/>
                <span  class="assertive" ng-show="!pwd.pwdSame" ng-hide="pwd.repwdfocus">
                    <span ng-show="myform.renewpwd.$error.required">*请输入新密码</span>
                    <span ng-show="!pwd.pwdSame" ng-hide="myform.renewpwd.$error.required">*两次密码不一致</span>
                       <!--*两次密码不一致-->
                </span>
            </label>
      <div class="item text-center">
          <span ng-disabled="!pwd.pwdSame||myform.newpwd.$invalid||myform.oldpwd.$invalid"
                class="button padding-horizontal-lg-scor button-block button-positive"
                ng-click="modifyPwd()" >
              确认修改
          </span>
      </div>
    </form>
  </ion-content>
</ion-view>

<script id="loginSuccess.html" type="text/ng-template">
    <ion-modal-view>
        <ion-content>
            Success
        </ion-content>
    </ion-modal-view>
</script>
